﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Chapter12
{
    public partial class Example03 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void button_Click(object sender, EventArgs e)
        {

            name.Text = Request.Form.Keys[3];
            value.Text = Request["fave"];
            view0.Text = Request.Form.Keys[0];
            view0Value.Text = Request.Form["__VIEWSTATE"];
            view1.Text = Request.Form.Keys[1];
            view1Value.Text = Request.Form["__VIEWSTATEGENERATOR"];
            view2.Text = Request.Form.Keys[2];
            view2Value.Text = Request.Form["__EVENTVALIDATION"];
            allView.Text = Request.Form.ToString();
            
        }

        protected void clearButton1_Click(object sender, EventArgs e)
        {
            value.Text = string.Empty;
            view0Value.Text = string.Empty;
            view1Value.Text = string.Empty;
            view2Value.Text = string.Empty;
            allView.Text = string.Empty;
        }
    }
}